package top.laoshuzi.designpatterns.base.behavior.iterator;

import org.junit.Test;

public class Client {

    @Test
    public void operation() {

        String names[] = {"Robert", "John", "Julie", "Lora"};
        Container container = new ConcreteContainer(names);
        Iterator iterator = container.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next().toString());
        }
    }
}
